package com.shtel.bss.saas.tenant.entity.repository.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.shtel.bss.saas.tenant.entity.SysRole;
import com.shtel.bss.saas.tenant.entity.repository.ISysRoleRepository;
import com.shtel.bss.saas.tenant.mapper.SysRoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * sys_role仓库现实类
 *
 * @author xiezhiwei 2020-02-05 21:21
 */
@Repository("sysRoleRepository")
public class SysRoleRepositoryImpl implements ISysRoleRepository {
    @Autowired
    private SysRoleMapper sysRoleMapper;

    @Override
    public PageInfo<SysRole> selectEntity(SysRole sysRole, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize, true);
        return new PageInfo(sysRoleMapper.selectEntity(sysRole));
    }

    @Override
    public SysRole selectOne(SysRole sysRole) {
        return sysRoleMapper.selectOne(sysRole);
    }
}